<?php
// 连接数据库
$link = mysqli_connect("localhost","root","root","2116");

// 接收id
$id = $_GET['id'];
// 删除的sql
$sql = "DELETE FROM students WHERE id=$id";
 mysqli_query($link,$sql);
 if(mysqli_affected_rows($link)){
	 // echo "<script>alert('删除成功'); window.location.href='./index.php'</script>";
	 $arr['info'] = "删除成功";
	 $arr['status'] = 1;
 }else{
	 // echo "删除失败";
	 $arr['info'] = "删除失败";
	 $arr['status'] = 0;
 }
 
 echo json_encode($arr);



?>